package com.labtalk.admin.controller;

import com.labtalk.admin.pojo.common.ResponseVo;
import com.labtalk.admin.pojo.model.UserModel;
import com.labtalk.admin.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    public ResponseVo login(@RequestBody UserModel user) {
        return loginService.login(user);
    }
}
